<?php
date_default_timezone_set('Asia/Shanghai');

//跨域请求配置===================
header("Access-Control-Allow-Origin: http://localhost:3333");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept, Connection, UserModel-Agent, Cookie, Accept-encoding, Accept-language, Host, Referer, User-agent");
header('Access-Control-Max-Age: 86400000');
//end===========================

const DS = '/';
define('CURR_TIME', time());
const ROOT_PATH = __DIR__ . '/..';
const APP_PATH = ROOT_PATH . '/application';
const LOG_PATH = ROOT_PATH . '/runtime/log';

require ROOT_PATH . '/vendor/autoload.php';

$environ = ini_get('yaf.environ');
$app  = new Yaf_Application(ROOT_PATH . "/conf/application.$environ.ini");
$app->bootstrap()->run();
